//package com.star.common.monitor.infras.config;
//
//import ch.qos.logback.classic.LoggerContext;
//import com.star.common.monitor.domain.external.send.dingding.service.DingDingRobotMonitorSender;
//import com.star.common.monitor.domain.external.send.qiwei.service.QiWeiRobotMonitorSender;
//import com.star.common.monitor.domain.robot.service.RobotLogbackAppendService;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * 日志告警配置
// *
// * @author Jensen
// * @公众号 架构师修行录
// */
//@Configuration
//@EnableConfigurationProperties(BaseMonitorProperties.class)
//@ConditionalOnClass(LoggerContext.class)
//@ConditionalOnProperty(name = "star.monitor.log.enable", havingValue = "true", matchIfMissing = true)
//public class BaseMonitorConfig {
//
//    @Bean
//    public RobotLogbackAppendService robotLogbackAppendService(BaseMonitorProperties properties) {
//        return new RobotLogbackAppendService(properties);
//    }
//
//    @Bean
//    @ConditionalOnProperty(name = "star.monitor.log.robot.qiwei.enable", havingValue = "true", matchIfMissing = true)
//    public QiWeiRobotMonitorSender qiWeiRobotSender(BaseMonitorProperties properties) {
//        return new QiWeiRobotMonitorSender(properties.getLog().getQiwei().getKey());
//    }
//
//    @Bean
//    @ConditionalOnProperty(name = "star.monitor.log.robot.dingding.enable", havingValue = "true")
//    public DingDingRobotMonitorSender dingDingRobotSender(BaseMonitorProperties properties) {
//        return new DingDingRobotMonitorSender(properties.getLog().getDingding().getToken(), properties.getLog().getDingding().getSecret());
//    }
//
//}